package com.wn.controller;

import com.wn.feign.UserFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collections;

@RestController
@RequestMapping("/user")
public class PortalController {


    @Autowired
    private UserFeignClient userFeignClient;

    @GetMapping("{userId}")
    public String findOne(@PathVariable("userId") Integer userId) {
        return userFeignClient.findUserById(userId);
    }

}